<?php $this->fetch('public/head') ?>
    <style>
        .hw-imgList img{max-height: 125px}
    </style>
<div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title">
        <li class="layui-this">图片列表</li>
    </ul>
    <div class="layui-tab-content">
        <form id="ss" class="layui-form layui-form-pane" action="" method="get">
            <div class="layui-inline">
                <label class="layui-form-label">栏目分类</label>
                <div class="layui-input-inline">
                    <select name="type" lay-filter="ss">
                        <?php foreach($class_type as $k=>$v): ?>
                            <option value="<?php echo $k ?>" <?php if(input('type')==$k){echo 'selected="selected"';} ?>><?php echo $v['title'] ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
            </div>
        </form>
        <hr>

        <div class="layui-tab-item layui-show">
            <table class="layui-table" lay-skin="line">
                <colgroup>
                    <col width="25%">
                    <col width="25%">
                    <col width="25%">
                    <col width="25%">
                </colgroup>
                <?php foreach ($list as $key=>$val): ?>
                <tr>
                    <?php foreach ($val as $k=>$v): ?>
                    <td align="center"  style="vertical-align: bottom">
                        <a target="_blank" href="<?php echo $v['img'] ?>" class="hw-imgList">
                            <img src="<?php echo $v['img'] ?>">
                        </a>
                        <div style="margin-top: 10px">
                            <!--<a class="copy layui-btn layui-btn-sm" data-clipboard-text="<?php /*echo $v['img'] */?>">复制路径</a>-->
                            <?php if($v['exist']): ?>
                                <a class="layui-btn layui-btn-sm">正在使用</a>
                            <?php else: ?>
                                <a href="<?php echo url('delete',['type'=>input('type',input('type','banner'))]) ?>" data-param="img=<?php echo $v['img'] ?>" class="layui-btn layui-btn-danger layui-btn-sm ajax-confim">彻底删除</a>
                            <?php endif ?>
                        </div>
                    </td>
                    <?php endforeach; ?>
                </tr>
                <?php endforeach; ?>
            </table>
        </div>
    </div>
</div>

<?php $this->fetch('public/script') ?>
<!--<script src="_js/clipboard.min.js"></script>

<script>
    var clipboard = new ClipboardJS('.copy');
    clipboard.on('success', function(e) {
        layer.msg('复制成功')
    });
</script>-->